package com.dog.basics.security.service;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 用户详细信息
 *
 * @author
 */
@Getter
@Setter
public class DogSysUser extends User {
	/**
	 * 用户ID
	 */
	@Getter
	private Long userId;

	/**
	 *  账户类型  1-管理员 2-代理商
	 */
	@Getter
	private Integer accountType;

	/**
	 * 账号类型 0 - 主  1-子账号
	 */
	@Getter
	private Integer accountLevel;

	public DogSysUser(Long userId,Integer accountType ,String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
		this.userId = userId;
		this.accountType = accountType;
		this.accountLevel =accountLevel;
	}
}
